﻿/** \file
* \$Rev: 186 $
* 
* \$Date: 2010-04-16 05:58:01 +0000 (Fri, 16 Apr 2010) $
*
* \$URL: http://chorus-twitter.googlecode.com/svn/trunk/src/twitter/Trend.cs $
*/

using System;
using System.Collections.Generic;
using chorus.utils;

namespace chorus.twitter
{
	/// <summary>
	/// A current trend on Twitter.
	/// </summary>
	public abstract class Trend
	{
		/// <summary>The name of the trend (starting with #).</summary>
		public string name;
	}

	/// <summary>
	/// A trend on Twitter and its associated query.
	/// </summary>
	public class QueryTrend : Trend
	{
		/// <summary>The query to use in searches related to this trend.</summary>
		public string query;
	}

	/// <summary>
	/// A trend on Twitter and its associated URL.
	/// </summary>
	public class UrlTrend : Trend
	{
		/// <summary>The URL to fetch to get messages associated with this trend.</summary>
		public string url;
	}

	/// <summary>
	/// An abstract trend object from which other trend list responses derive.
	/// </summary>
	public class AbstractTrends
	{
	}

	/// <summary>
	/// A simple list of trends.
	/// </summary>
	public class TrendsDefault : AbstractTrends
	{
		/// <summary>The list of trends.</summary>
		public List<UrlTrend> trends;
		/// <summary>The time that this request was made.</summary>
		public DateTime as_of;
	}

	/// <summary>
	/// A list of trends as a dictionary where the key is the associated 
	/// trend date/time.
	/// </summary>
	public class TrendsByDate : AbstractTrends
	{
		/// <summary>The map of date/time-to-trend list.</summary>
		public Dictionary<DateTime, List<QueryTrend>> trends;
		/// <summary>The ID of the earliest trend associated with this request.</summary>
		public ulong as_of;
	}
}
